<?php
namespace app\api\validate;

use think\Validate;

class ApiUser extends Validate
{
    protected $rule = [
        'username' => 'require|max:100',
        'phone' => 'require|length:11|/^1[3-9][0-9]{9}$/'
    ];

    protected  $message = [
        'username' => '用户名必须填|用户名不能超过100字符',
        'phone' => '请输入手机号|手机号格式不对|手机号格式不对'
    ];

    protected $scene = [
        'send_code' => ['phone']
    ];
}
